<?php
/*短信设置*/
require (dirname(dirname(__FILE__)).'/common/common.php');
admin_check('ajax');//管理员验证

$gbook_duanxin_come = isset($_POST['gbook_receive'])?$_POST['gbook_receive']:0;
$job_duanxin_come = isset($_POST['job_receive'])?$_POST['job_receive']:0;

$x_target_no = isset($_POST['x_target_no'])?$_POST['x_target_no']:null;
$x_eid = isset($_POST['x_eid'])?$_POST['x_eid']:null;
$x_uid = isset($_POST['x_uid'])?$_POST['x_uid']:null;
$x_pwd = isset($_POST['x_pwd'])?$_POST['x_pwd']:null;


if($x_pwd){
	$x_pwd_md5 = md5($x_pwd);
}

	$display_order = array(
    29 => $job_duanxin_come,
    30 => $gbook_duanxin_come,
    31 => $x_target_no,
    23 => $x_eid,
    24 => $x_uid,
	25 => $x_pwd_md5
    );
//print_r($display_order);

$ids = implode(',', array_keys($display_order));

$sql = "UPDATE ".lc()."_config SET lc_value = CASE lc_id ";
foreach ($display_order as $id => $ordinal) {
	//echo $ordinal."  ";
	
	$sql .= "WHEN {$id} THEN '{$ordinal}' ";
   // $sql .= sprintf("WHEN %d THEN %x ", $id, $ordinal);
}
$sql .= "END WHERE lc_id IN ($ids)";

if(mysql_query($sql)){
	echo "yes";
	}else{
	echo "no";	
	}

?>